#define _CRT_SECURE_NO_WARNINGS
#include "slist.h"
void TestSList1()
{
	SListNode* plist = NULL;
	SListPushFront(&plist, 1);
	SListPushFront(&plist, 2);
	SListPushFront(&plist, 3);
	SListPushFront(&plist, 4);
	SListPushFront(&plist, 5);
	SListPushFront(&plist, 6);
	SListPushFront(&plist, 7);
	SListPushFront(&plist, 8);
	SListPushFront(&plist, 9);

	SListPrint(plist);

	SListPopBack(&plist);
	SListPrint(plist);

	SListPopBack(&plist);
	SListPrint(plist);
	SListPopFront(&plist);
	SListPrint(plist);

	SListNode*pos=SListFind(plist, 3);
	if (pos) {
		SListPrint(pos);
	}
	SListInsertAfter(plist, 2);
	SListEraseAfter(plist->next);
	SListPrint(plist);
	SLTInsert(&plist, plist->next, 2);
	SListPrint(plist);
	SLTErase(&plist, plist->next);
	SListPrint(plist);
	SLTDestroy(&plist);
}


int main()
{
	TestSList1();

	return 0;
}